home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000303_fdc@sesame.cc.columbia.edu_Thu Sep 25 17:58:30 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  83 lines

  1. Article: 14547 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news-not-for-mail
  3. From: fdc@sesame.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: How to make use of a terminal server
  6. Date: 25 Sep 2003 17:58:25 -0400
  7. Organization: Columbia University
  8. Lines: 66
  9. Message-ID: <bkvoe1$s9d$1@sesame.cc.columbia.edu>
  10. References: <gQHcb.483$z11.142@newssvr22.news.prodigy.com>
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1064527106 27304 128.59.59.56 (25 Sep 2003 21:58:26 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 25 Sep 2003 21:58:26 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14547
  16.  
  17. In article <gQHcb.483$z11.142@newssvr22.news.prodigy.com>,
  18. Jun Zhang  <nugulus@netscape.net> wrote:
  19. : I have access to a terminal server where a modem pool is served. 
  20. : Invokation of the modem is like the following,
  21. : telnet hostname portnum
  22. : Username:   (type name and return)
  23. : Password:   (type pass and return)
  24. : atdtphonenumber
  25. : I tried to use the following kermit script to automate the authentication,
  26. : #!/usr/local/bin/kermit
  27. : def myuserid username
  28. : def mypasswd password
  29. : set carrier-watch off
  30. : set host hostname portnum
  31. :
  32. You need an "if failure" command here in case the connection fails.
  33.  
  34. : for \%i 1 10 1 {
  35. :      input 20 Username:
  36. :      if success break
  37. :      output \13
  38. : }
  39. : if > \%i 10 exit 1 No login prompt.
  40. : output \m(myuserid)\13
  41. : for \%j 1 10 1 {
  42. :     input 10 Password:
  43. :     if success break
  44. :     output \13
  45. : {
  46. :
  47. That should be a right brace.
  48.  
  49. : if > \%j 10 exit No Password prompt.
  50. : output \m(mypasswd)\13
  51. : undef mypasswd
  52. : but password is always prompted interactively. My immediate purpose is 
  53. : to use the dial command in the kermit script, how can I do it?
  54. I don't understand what you mean by "password is always prompted
  55. interactively".  The password prompt is printed by the terminal server,
  56. correct?  Therefore "input 10 Password:" should see it and succeed, and
  57. then the password will be sent by the "output \m(mypasswd)\13" command.
  58. Are you saying that this is not happening?
  59.  
  60. Maybe you are using a secure version of C-Kermit and the terminal server
  61. is requesting a secure form of authentication, which causes C-Kermit to 
  62. prompt for the password locally?  To debug this, tell C-Kermit to "set 
  63. telnet debug on".
  64.  
  65. Anyway, after you have received the Password prompt and sent the password, 
  66. you can:
  67.  
  68.   set modem type <name-of-modem>
  69.   dial <phone-number>
  70.   if fail (do something)  
  71.  
  72. Also see:
  73.  
  74.   http://www.columbia.edu/kermit/ckermit80.html#x14
  75.  
  76. - Frank
  77.